<template>
    <pui-drawer show :title="mainRef.passtitle" position="left">
        <div class="form-drawer-content">
            <horizontal-design v-show="mainRef.nowTabIndex === '0'" ref="HorizontalDesignRef" @showSetting="showSetting" @show-quantum-well="showQuantumWell" :type="mainRef.type" />
            <vertical-design v-show="mainRef.nowTabIndex === '1'" ref="VerticalDesignRef" @showSetting="showSetting" :type="mainRef.type" />
        </div>
    </pui-drawer>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
    name: 'structure-design',
})
</script>
<script lang="ts" setup>
import { reactive, getCurrentInstance } from 'vue'
import mainData from './index'
import horizontalDesign from './horizontalDesign.vue'
import verticalDesign from './verticalDesign.vue'
const { proxy } = getCurrentInstance() as any
const mainRef = reactive({
    passtitle:'横向结构设计-横截面设计',
    nowTabIndex: '0',
    type: 'plane'
})
const tabClickHandle = (e:any) => {
    mainRef.nowTabIndex = e.id
    mainRef.passtitle = e.title
}
const init = (title: any, type: any, index: any = '0') => {
    mainRef.passtitle = title
    mainRef.type = type
    mainRef.nowTabIndex = index
}
const showSetting = (e: any) => {
}
const onSubmit = () => {

}
const showQuantumWell = () => {
    proxy.$parent.$refs.QuantumWellDialogRef.init()
}
defineExpose({
    init
})
</script>